 function queryString(name, url) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"),
        r = window.location.search.substr(1).match(reg);
    if (url) {
        r = url.split('?')[1].match(reg);
    }
    if (r != null) return unescape(r[2]);
    return null;
}

export default queryString